import './index.less';

const element = document.createElement('div');
const elementImg = document.createElement('img');
element.classList.add('loading_page');
elementImg.setAttribute(
  'src',
  'https://h5.mythinkcar.cn/vueh5/static/img/loading.gif'
);
element.appendChild(elementImg);
// element.innerHTML = '<div class="loading_page"><img src="https://h5.mythinkcar.cn/vueh5/static/img/loading.gif"></div>'
document.body.appendChild(element);

const loading = {
  show: () => {
    element.style.display = 'flex';
  },
  hide: () => {
    element.style.display = 'none';
  }
};

export default loading;
